As the titles says..
How can you find out when a player is moving/walking?
Use getmovement to query the above and it should tell you what the player is doing.Code:moveposflags ( String position, [String movement] ) used by the state files to tell the game dll what the player is doing
Code://am I running? local.movement = ( local.player getmovement ) if(local.movement == "running") { iprintlnbold_noloc "Yes I am running, we learn something everyday" }
Last edited by Elgan; May 6th, 2013 at 01:49 PM.
turn logfile 3 on and set developer 1
and try again; if the command didnt work, it would error..but it does work, so you have any error somewhere else.
maybe put in some printlns and find out whats going on,
put this above
and tell me what it prints.Code:if(local.player == NIL) { local.player= " NIL" } iprintln (" Player is " + local.player )
Just your code to see if the println does something, then i will try to add some stuff.
Error now:Code://am I running? if(local.player == NIL) { local.player= " NIL" } iprintln (" Player is " + local.player ) { local.movement = ( local.player getmovement ) if(local.movement == "running") { println "Yes I am running, we learn something everyday" } }
Code:local.movement = ( local.player getmovement ) (global/detectwalking.scr, 9) local.movement = ( local.player ^ ^~^~^ Script Error: There are 0 entities with targetname ' NIL'. You are using a command that requires exactly one.